#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define TAILLE_MAX 8

char* add (char* in)
{
  int j;
  int size = strlen(in);
  int i=size-1;
  int notz=size-1;
  //printf("size : %d\n", size);
  while(i>=0)
    {
      if(in[i]=='z')
	{
	  notz--;
	  i--;
	}
      else break;
    }
  //printf("notz : %d\n", notz);
  for(j=(notz+1);j<size;j++)
    {
      //printf("%d\n",j);
      in[j]='a';
    }
  //printf("ok\n");
  if(notz>=0)
    {
      in[notz]++;
      //printf("%c\n",in[notz]);
    }
  else
    {
      for(j=size; j>0; j--)
	{
	  in[j]=in[j-1];
	}
      in[0]='a';
    }
  return in;
}



int main(int argc, char* argv[])
{
  printf("password : %s\n", argv[0]);
  /*char* mdp=malloc(*sizeof(char));
  char* inf=argv[1];
  char* sup=argv[2];
 
  

  while(!strcmp(current, sup)&& !strcmp(mdp,current))
    {
           add(in);
    }
  return strcmp(mdp, current);
  
  char* buf=malloc((TAILLE_MAX+1)*sizeof(char));
  scanf("%s",buf);
  add(buf);
  printf("%s\n",buf);
  free(buf);
*/
  

  return EXIT_SUCCESS;
}
